//
//  UserMessageService.h
//  AILock
//
//  Created by 谭亚明 on 2020/6/23.
//  Copyright © 2020 tym. All rights reserved.
//

#import "LMJBaseRequest.h"
#import "UserMessageModel.h"

/** 获取用户消息列表*/
#define urlUsermessagefindmessages @"/user-message/find-messages"

/** 获取用户各类型消息*/
#define urlUsermessagefindtypemessage @"/user-message/find-type-message"


/** 读取消息*/
#define urlReadmessage @"/user-message/read-message"


/** 获取用户未读消息数量*/
#define urlUsermessageunreadnum  @"/user-message/unread-num"


/** 设置用户设备消息通知*/
#define urlSetequipmentmessageconfig @"/user-message/set-equipment-message-config"

/** 设置用户设备消息免打扰*/
#define urlSetUsermessageconfig @"/user-message/set-user-message-config"

/** 查询家庭用户设备消息免打扰*/
#define urlFindusermessageconfig @"/user-message/find-user-message-config"


@interface UserMessageService : LMJBaseRequest

/*获取用户消息列表*/
-(void)getFindUsermessagesFamilyID:(NSInteger)familyId
                              type:(NSInteger)type
pageIndex:(NSInteger)index
                        equipmentId:(NSString*)equipmentId
equipmentMsgType:(NSInteger)equipmentMsgType
completion:(void(^)(LMJBaseResponse *respon, NSArray<UserMessageModel*>*mesageArray))completion;

/*获取用户各类型消息*/
-(void)getFindUsermessagesFamilyID:(NSInteger)familyId completion:(void(^)(LMJBaseResponse *respon, NSArray<UserMessageModel*>*mesageArray))completion;

/*读取消息*/
-(void)getReadmessage:(NSString*)messageIDs completion:(void(^)(LMJBaseResponse *respon))completion;

/*获取用户未读消息数量*/
-(void)getUnreadnumFamilyId:(NSInteger)familyId completion:(void(^)(LMJBaseResponse *respon))completion;

/*设置用户设备消息免打扰*/
-(void)getEquipmentmessageconfigId:(NSInteger)messageID
type:(NSInteger)type
familyId:(NSInteger)familyId
isOpen:(BOOL)isOpen
equipmentId:(NSInteger)equipmentId
                        completion:(void(^)(LMJBaseResponse *respon))completion;


/*查询家庭用户设备消息免打扰*/
-(void)getFindusermessageconfig:(NSInteger)familyId completion:(void(^)(LMJBaseResponse *respon,MessageConfig *config))completion;

/** 设置用户设备消息通知*/
-(void)getUserMessageconfigId:(NSInteger)messageID
                              startTime:(NSString*)startTime
                           endTime:(NSString*)endTime
                          familyId:(NSInteger)familyId
                            isOpen:(BOOL)isOpen
                   completion:(void(^)(LMJBaseResponse *respon))completion;
@end
